/***************************************************************
 * Name:      EditorMain.h
 * Purpose:   Defines Application Frame
 * Author:     ()
 * Created:   2014-08-24
 * Copyright:  ()
 * License:
 **************************************************************/

#ifndef EDITORMAIN_H
#define EDITORMAIN_H

#include "EditorApp.h"
#include "BaseMainFrame.h"
#include "Renderer.h"
#include "Documents/IDocument.h"
#include "Documents/DetailDocument.h"

class MainFrame: public BaseMainFrame
{
public:
	MainFrame(wxFrame *frame);
	~MainFrame();

private:
	virtual void OnNew(wxCommandEvent& event);
	virtual void OnOpen(wxCommandEvent& event);
	virtual void OnSave(wxCommandEvent& event);
	virtual void OnSaveAs(wxCommandEvent& event);
	virtual void OnClose(wxCommandEvent& event);
	virtual void OnUndo(wxCommandEvent& event);
	virtual void OnRedo(wxCommandEvent& event);
	virtual void OnQuit(wxCommandEvent& event);
	virtual void OnAbout(wxCommandEvent& event);
	virtual void OnExit(wxCloseEvent &event);

private:
	void CloseDocument();
	void NewDocument();
	void SaveDocument();
	void SaveDocumentAs();
	void OpenDocument();

private:
	wxFileDialog* m_openFileDialog;
	wxFileDialog* m_saveFileDialog;

	IDocument* _document;
	wxString _currentFilePath;
};

#endif // EDITORMAIN_H
